Skip to content

update Rust to 1.87.0 #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 1, 2025
Merged

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented May 22, 2025

Issue number:
Fixes #272

Description of changes:
Update Rust to 1.87.0.

Set the panic strategy to "abort" for all custom targets. This preserves unwinding for developer builds outside of the SDK, where the custom targets are not available, while reducing the disk usage and runtime overhead for production builds.

Testing done:
Built kits and smoke-tested variants for both architectures.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

bcressey added 5 commits May 19, 2025 20:47
Set the panic strategy to "abort" for custom targets, since we expect
that Rust crates for Bottlerocket will be written to avoid panics,
and don't want to pay the cost in binary size to support unwinding.

This lets us avoid specifying the "abort" behavior in Cargo.toml at
the crate or workspace level, so that release builds using the normal
targets on developer systems will default to "unwind", which can be
helpful for debugging.

Signed-off-by: Ben Cressey <[email protected]>
Signed-off-by: Ben Cressey <[email protected]>
Signed-off-by: Ben Cressey <[email protected]>
Signed-off-by: Ben Cressey <[email protected]>
Otherwise cargo emits this warning:
  warning: `.../.cargo/config` is deprecated in favor of `config.toml`

Signed-off-by: Ben Cressey <[email protected]>
@bcressey bcressey requested review from cbgbt, jmt-lab and sam-berning May 22, 2025 22:07
Dockerfile Outdated
@@ -285,7 +285,7 @@ RUN \

ARG HOST_ARCH
ENV VENDOR="bottlerocket"
ENV RUSTVER="1.85.1"
ENV RUSTVER="1.86.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to keep the commits that bump 1.85.0 -> 1.85.1 -> 1.86.0 -> 1.87.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept them to show the progression, and in case we needed to revert 1.87.0 at the last minute without necessarily backing out the other changes. 1.85.1 is useful as it lets us drop the cc-rs patch.

@bcressey
Copy link
Contributor Author

Marking as ready for review now that the downstream clippy fixes have been merged.

@bcressey bcressey merged commit f5386db into bottlerocket-os:develop Jun 1, 2025
@bcressey bcressey deleted the bump-rust branch June 1, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update to Rust 1.87.0
4 participants